/**
 * User: alesj
 * Date: 2005.3.23
 * Time: 16:09:57
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.generalynx.ecos.beans.orm;

import org.hibernate.Interceptor;
import org.hibernate.CallbackException;
import org.hibernate.EntityMode;
import org.hibernate.Transaction;
import org.hibernate.type.Type;

import java.io.Serializable;
import java.util.Iterator;

/**
 * Empty implementation - use for overridding.
 */
public class InterceptorAdapter implements Interceptor {

    public boolean onLoad(Object entity,
                          Serializable id,
                          Object[] state,
                          String[] propertyNames,
                          Type[] types) throws CallbackException {
        return false;
    }

    public boolean onFlushDirty(Object entity,
                                Serializable id,
                                Object[] currentState,
                                Object[] previousState,
                                String[] propertyNames,
                                Type[] types) throws CallbackException {
        return false;
    }

    public boolean onSave(Object entity,
                          Serializable id,
                          Object[] state,
                          String[] propertyNames,
                          Type[] types) throws CallbackException {
        return false;
    }

    public void onDelete(Object entity,
                         Serializable id,
                         Object[] state,
                         String[] propertyNames,
                         Type[] types) throws CallbackException {
    }

    public void preFlush(Iterator entities) throws CallbackException {
    }

    public void postFlush(Iterator entities) throws CallbackException {
    }

    public Boolean isTransient(Object entity) {
        return null;
    }

    public int[] findDirty(Object entity,
                           Serializable id,
                           Object[] currentState,
                           Object[] previousState,
                           String[] propertyNames,
                           Type[] types) {
        return null;
    }

    public Object instantiate(String entityName, EntityMode entityMode, Serializable id)
            throws CallbackException {
        return null;
    }

    public String getEntityName(Object object) throws CallbackException {
        return null;
    }

    public Object getEntity(String entityName, Serializable id) throws CallbackException {
        return null;
    }

    public void onCollectionRecreate(Object collection, Serializable key) throws CallbackException {
    }

    public void onCollectionRemove(Object collection, Serializable key) throws CallbackException {
    }

    public void onCollectionUpdate(Object collection, Serializable key) throws CallbackException {
    }

    public String onPrepareStatement(String sql) {
        return null;
    }

    public void afterTransactionBegin(Transaction tx) {
    }

    public void beforeTransactionCompletion(Transaction tx) {
    }

    public void afterTransactionCompletion(Transaction tx) {
    }

}
